This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
ts = 1546734359 | |
n = datetime.fromtimestamp(ts) | |
date_formatted = n.strftime('%Y-%m-%d %H:%M:%S') | |
# print(date_formatted) | |
return date_formatted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create an empty service | |
create_params = { ... } | |
created_item = gis.content.create_service(name=create_params['name'] , create_params=create_params) | |
# get a reference to the base feature service | |
ci_fl = FeatureLayer(created_item.url) | |
# create a feature collection from your dataframe | |
fc = final_df.spatial.to_feature_collection() |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
indicator: "8.5.1", | |
year: "2019", | |
category: "Age", | |
subcategory: "25 years old and over", | |
name: "Alaska", | |
geoid: "0400000US02", | |
uuid: "65f89160-f03b-409b-9e44-36b8f07b6cbc", | |
parentgeoid: "0100000US", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// item id of the first layer you want to use | |
var itemId1 = '67959bfbb58e400d80a2dc1be3542338'; | |
// item id of the second layer you want to use | |
var itemId2 = '22a65ba4870a41a69ed0d8d843480d3c'; | |
var layerId = 0; | |
var portalUrl = 'https://www.arcgis.com'; | |
var fieldList = ['time_period', 'obs_value']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// here is my original data format | |
{ | |
PERCENT_BELOW_POVERTY_LEVEL_AMERICAN_INDIAN_AND_ALASKA_NATIVE_ALONE_P_2015: 52.2 | |
PERCENT_BELOW_POVERTY_LEVEL_AMERICAN_INDIAN_AND_ALASKA_NATIVE_ALONE_P_2016: 39.6 | |
PERCENT_BELOW_POVERTY_LEVEL_AMERICAN_INDIAN_AND_ALASKA_NATIVE_ALONE_P_2017: 42.2 | |
PERCENT_BELOW_POVERTY_LEVEL_AMERICAN_INDIAN_AND_ALASKA_NATIVE_ALONE_P_2018: 40.7 | |
PERCENT_BELOW_POVERTY_LEVEL_AMERICAN_INDIAN_AND_ALASKA_NATIVE_ALONE_P_2019: 8.6 | |
} | |
// can i transform it to something like this? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
padding: 2%; | |
min-height: 400px; | |
text-align: left; | |
position: relative; | |
vertical-align: top; | |
/* add these below to get the cards top-aligned */ | |
display: flex; | |
flex-wrap: wrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(['dojo/topic'], function(topic) { | |
/* | |
* Custom Javascript to be executed while the application is initializing goes here | |
*/ | |
// function to get the query params from the URL | |
var getQueryStringValue = function(key) { | |
return decodeURIComponent(window.location.search.replace(new RegExp('^(?:.*[&\\?]' + encodeURIComponent(key).replace(/[\.\+\*]/g, '\\$&') + '(?:\\=([^&]*))?)?.*$', 'i'), '$1')); | |
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder