A Framework for Planning LoRaWan Networks